package com.coldworks.coldjoke.util;

import java.util.regex.Pattern;

/**
 * 常量集
 * 
 * @since 2012-03-23
 */
public final class CONST {

	private CONST() {
	}

	public static class APP_ID {
		public static final String WEIXIN_APP_ID = "wx948d9e6f204c7b6f";
	}

	public static final Pattern IMG_PATTERN = Pattern
			.compile("\\[image_+\\d+\\]");

	public static final Pattern PRE_IMG_PATTERN = Pattern
			.compile("\\[image[_| ]\\S+ ?\\]");

	public static class URL {
		public static final String HOST = "http://lengxiaohua.com";
		public static final String HOST_API = "http://lengxiaohua.com/lengxiaohuaapi";
		public static final String REGISTER = HOST_API + "/register"; // 注册
		public static final String PROFILE = HOST_API + "/profile"; // 登录
		public static final String COMENT = HOST_API + "/comment"; // 评论
		public static final String GATHER_COMMENT = HOST_API
				+ "/gather-comment";
		public static final String JOKE = HOST_API + "/joke"; // 发表笑话
		public static final String JUDGE = HOST_API + "/judge"; // 获得一个待审核的笑话
		public static final String LOG = HOST_API + "/log"; // 顶和踩
		public static final String GATHER = HOST_API + "/gather";// 取编辑推荐

		public static final String WEIBO_SINA = "http://weibo.com/lengxiaohua"; // 官方微博
		public static final String WEIBO_QQ = "http://t.qq.com/anzhuobizhi"; // 官方微博
		public static final String MARKET_HIAPK = "http://m.sc.hiapk.com/himarket?srcCode=80031&clientType=81002"; // 安卓市场
		public static final String MARKET_LINK = "market://details?id=com.coldworks.coldjoke"; // 打开本地市场并进行搜索的uri
		public static final String APP = HOST_API + "/app"; // 检测新版本
	}

	public static class LOCAL {
		public static final String MARKET_LINK = "market://details?id=com.coldworks.coldjoke"; // 打开本地市场并进行搜索的uri
		public static final String INSTALL_CMD = "application/vnd.android.package-archive"; // 安装软件uri
	}

	public static class KEY {
		public static final String TEXT_MODE = "TEXT_MODE";
	}

	public static class VALUE {
		// public static final int PAGE_SIZE = 20; // 每页显示笑话的个数
		public static final int TOPIC_PAGE_SIZE = 10; // TOPICS 每页显示的个数
		public static final int MAX_NUM_JOKES_IN_DB = 50;
		public static final String JOKE_ID = "JOKE_ID";// 待审核笑话的ID，可用于下次取审核笑话
	}

	public static class OP {
		public static final int SAVEJOKE = 0x200;
	}

	public static class SORT {
		public static final String NEW = "new";
		public static final String POPULAR = "popular";
		public static final String SHIT = "shit";
		public static final String LOCAL = "local";
	}

	public static class TYPE {
		public static final String TEXT = "text";
		public static final String IMAGE = "image";
		public static final String VEDIO = "vedio";
		public static final String TEXT_AND_IMAGE = "text%7Cimage";
		public static final String ALL = "all";
	}

	public static class RESULT {
		public static final int JUDGE_RESULT = 0x100;
		public static final int LOGIN_RESULT = 0x101;
		public static final int JOKE_RESULT = 0x102;
		public static final int RESULT_OK = -1;
		public static final int RESULT_CANCELED = 0;
		public static final int RESULT_FAILED = 1;
	}
}
